package com.generator.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * 表值规则
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class ValueRuleDto implements Serializable{
	/** 列名称 */
    @Length(max =50 ,message = "长度不能超过50位")
	private String column;
	/** 值规则内容 */
    @NotEmpty(message = "值规则内容必填")
	private String content;
	/** 数据库配置编号 */
    @Length(max =50 ,message = "长度不能超过50位")
	private String databsourceId;
	/** 主键 */
	private Integer id;
	/** 表名称 */
    @Length(max =50 ,message = "长度不能超过50位")
	private String tableName;

	public void setColumn(String column) {
		this.column = column;
	}
	
	public String getColumn() {
		return this.column;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public String getContent() {
		return this.content;
	}
	public void setDatabsourceId(String databsourceId) {
		this.databsourceId = databsourceId;
	}
	
	public String getDatabsourceId() {
		return this.databsourceId;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	public Integer getId() {
		return this.id;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	
	public String getTableName() {
		return this.tableName;
	}

	
    
    @Override
    public String toString() {
        return "ValueRule{" +
		"column=" + column +
		",content='" + content + "'" + 
		",databsourceId='" + databsourceId + "'" + 
		",id='" + id + "'" + 
		",tableName='" + tableName + "'" + 
                '}';
    }
	
}